<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> 
<%@taglib prefix="security" uri="http://www.springframework.org/security/tags"%>

		<div class="col-md-12 column">
			<nav class="navbar navbar-default navbar-inverse" role="navigation">
				<div class="navbar-header">
					 <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"> <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button> <a class="navbar-brand" href="#">Brand</a>
				</div>
				
				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li class="active">
							<a href="main.html">首页</a>
						</li>
						<li>
							<a href="publish.html?code=${user.code}">发布中心</a>
						</li>
						<li class="dropdown">
						<security:authorize ifAnyGranted="ROLE_ADMIN,ROLE_USER">
							 <a href="#" class="dropdown-toggle" data-toggle="dropdown">物品管理<strong class="caret"></strong></a>
						</security:authorize>
							<ul class="dropdown-menu">
								<li>
									<a href="addMessage.html?code=${user.code}&status=0">发布物品</a>
								</li>
								<li>
									<a href="cancel.html?code=${user.code}&status=1">撤销物品</a>
								</li>
								<li>
									<a href="goodsList.html?code=${user.code}&pageNumber=1">查看物品</a>
								</li>
								
								<li>
									<a href="historyList.html?code=${user.code}&pageNumber=1">交易历史</a>
								</li>
								
								
							</ul>
						</li>
                        <li class="dropdown">
                        <security:authorize access="hasRole('ROLE_ADMIN')">
							 <a href="#" class="dropdown-toggle" data-toggle="dropdown">后台管理<strong class="caret"></strong></a>
						</security:authorize>
							<ul class="dropdown-menu">
								<li>
									<a href="userList.html?code=${user.code}&pageNumber=1">用户管理</a>
								</li>
								<li>
									<a href="goodsListOfAdm.html?code=${user.code}&pageNumber=1">物品管理</a>
								</li>
								<li>
									<a href="messageList.html?code=${user.code}&pageNumber=1">信息统计</a>
								</li>
								<li>
									<a href="styleList.html?code=${user.code}&styleId=0&pageNumber=1">种类管理</a>
								</li>
								
							</ul>
						</li>
					</ul>
					<form class="navbar-form navbar-left" role="search">
						<div class="form-group">
							<input type="text" class="form-control">
						</div> <button type="submit" class="btn btn-default">搜索</button>
					</form>
					<ul class="nav navbar-nav navbar-right">
						<li>
						<security:authorize access="hasRole('ROLE_GUEST')">
							<a href="login.html">登陆/注册</a>
						</security:authorize >
						</li>
						<li class="dropdown">
						<security:authorize ifAnyGranted="ROLE_ADMIN,ROLE_USER">
							 <a href="#" class="dropdown-toggle" data-toggle="dropdown">个人中心<strong class="caret"></strong></a>
						</security:authorize>
							<ul class="dropdown-menu">
								<li>
									<a href="updateUser.html?code=${user.code}">修改信息</a>
								</li>
								<li>
									<a href="user.html?code=${user.code}">信息查看</a>
								</li>
								<li>
									<a href="updatePassword.html?code=${user.code}">修改密码</a>
								</li>
								<li class="divider">
								</li>
								<li>
									<a href="./j_spring_security_logout">退出</a>
								</li>
							</ul>
						</li>
					</ul>
				</div>
				
			</nav>
		</div>


